/**
 * Result 组件的主题配置
 */

import type { ComponentToken } from 'antd/es/result/style';

const TYPOGRAPHY_TOKENS = {
  titleFontSize: 24,
  subtitleFontSize: 14,
  iconFontSize: 72,
} as const;

const SPACING_TOKENS = {
  extraMargin: '24px 0 0 0',
} as const;

export const resultThemeConfig: Partial<ComponentToken> = {
  titleFontSize: TYPOGRAPHY_TOKENS.titleFontSize,
  subtitleFontSize: TYPOGRAPHY_TOKENS.subtitleFontSize,
  iconFontSize: TYPOGRAPHY_TOKENS.iconFontSize,
  extraMargin: SPACING_TOKENS.extraMargin as any,
};

export const getResultTheme = (
  customConfig?: Partial<ComponentToken>
): Partial<ComponentToken> => {
  return {
    ...resultThemeConfig,
    ...customConfig,
  };
};

export type { ComponentToken as ResultComponentToken } from 'antd/es/result/style';

